package com.loyal.loyalerp.system.mapper;


import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;

import com.loyal.loyalerp.system.mapper.provider.GySystemProvider;
import com.loyal.loyalerp.system.model.GySystem;


@Mapper
public interface GySystemMapper {
	
	//根据systemcode查systemname
	@SelectProvider(type=GySystemProvider.class,method="selectSystemNameBySystemCode")
	GySystem selectSystemNameBySystemCode(String systemcode);
	
	//根据systemname查systemcode
	@SelectProvider(type=GySystemProvider.class,method="selectSystemCodeBySystemName")
	GySystem selectSystemCodeBySystemName(String systemname);
	
    int deleteByPrimaryKey(Integer id);

    int insert(GySystem record);

    int insertSelective(GySystem record);

    GySystem selectByPrimaryKey(Integer id);
    //模糊查询
    List<GySystem> selectAll(@Param("record") GySystem record);
    
    //分页功能
    @SelectProvider(type=GySystemProvider.class,method="listGySystem")
	List<GySystem> listGySystem(String sidx,String sord);
    
    @SelectProvider(type=GySystemProvider.class,method="findGySystem")
	List<GySystem> findGySystem(String searchField, String searchString);
    
    int updateByPrimaryKeySelective(GySystem record);

    int updateByPrimaryKey(GySystem record);
}